<?php

class PhotoController extends Zend_Controller_Action {
	
	public function showAction() {
		
		$user_email = $this->_getParam("user_email");
		$upload_datetime = $this->_getParam("upload_datetime");
		
		if ($user_email !== null && $upload_datetime !== null) {
			
			$filename = APPLICATION_PATH . "/photos/" . $user_email . " - " . $upload_datetime;
			try {
				$photo = PhpThumbFactory::create($filename);
			} catch (Exception $e) {
				exit();
			}
			$photo->show();
			
		}
		
		exit();
		
	}
	
}